package com.rayc.test;

import org.junit.Test;
import redis.clients.jedis.Jedis;

public class demo1 {


    @Test
    public void set(){
        //1.连接redis
        Jedis jedis = new Jedis("192.168.232.128",6379);
        //2.操作redis
        jedis.set("name","李四" );
        //3.释放资源
        jedis.close();
    }
    @Test
    public void get(){
        //1.连接redis
        Jedis jedis = new Jedis("192.168.232.128",6379);
        //2.操作redis
        System.out.println(jedis.get("name"));
        //3.释放资源
        jedis.close();
    }
}
